# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=libwpe
pkgver=1.14.1
pkgrel=2
pkgdesc="General-purpose library for WPE WebKit"
url="https://wpewebkit.org"
arch=(x86_64)
license=(custom)
depends=(
  gcc-libs
  libegl
  libxkbcommon
)
makedepends=(
  git
  mesa
  meson
)
provides=(libwpe-1.0.so)
_commit=40a382f1a02db5a57b0e510ddfc9498f2458be83  # tags/1.14.1^0
source=("git+https://github.com/WebPlatformForEmbedded/libwpe?signed#commit=$_commit")
b2sums=('SKIP')
validpgpkeys=('5AA3BC334FD7E3369E7C77B291C559DBE4C9123B') # Adrián Pérez de Castro <aperez@igalia.com>

pkgver() {
  cd libwpe
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd libwpe
}

build() {
  arch-meson libwpe build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libwpe/COPYING
}

# vim:set sw=2 sts=-1 et:
